<?php

include_once"mp3.class.php";

$mesMp3[] = new Mp3("3 Y'a de la joie", "Charles Trenet", 3.09);
$mesMp3[] = new Mp3("2 No pain No game", "BTOOOM!", 3.14);
$mesMp3[] = new Mp3("1 My world", "Egoist", 2.97);

usort($mesMp3, array("Mp3","compareToDuree"));

foreach($mesMp3 as $unMp3){
    echo $unMp3."\n";
}